package com.wesley.application;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableZuulProxy
public class SpringZuulApplication {


    @Bean
    public MyZuulFilter myZuulFilter(){
       return new MyZuulFilter();
    }

    //断路器
    @Bean
    public MyFallbackProvider myFallbackProvider(){
        return new MyFallbackProvider();
    }



    /**
     * @author: wesley
     *
     * @datetime: 2018-03-12 13:49
     *
     * @desc: 启动主类
     **/
    public static void main(String[] args){
        SpringApplication.run(SpringZuulApplication.class,args);
    }


}
